<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    543. Diameter of Binary Tree
   </h1>
   <p>
    Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the
    <b>
     longest
    </b>
    path between any two nodes in a tree. This path may or may not pass through the root.
   </p>
   <p>
    <b>
     Example:
    </b>
    <br>
    Given a binary tree
    <br>
   </p>
   <pre>
          1
         / \
        2   3
       / \     
      4   5    
</pre>
   <p>
    Return
    <b>
     3
    </b>
    , which is the length of the path [4,2,1,3] or [5,2,1,3].
   </p>
   <p>
    <b>
     Note:
    </b>
    The length of path between two nodes is represented by the number of edges between them.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    543. 二叉树的直径
   </h1>
   <p>
    给定一棵二叉树，你需要计算它的直径长度。一棵二叉树的直径长度是任意两个结点路径长度中的最大值。这条路径可能穿过根结点。
   </p>
   <p>
    <strong>
     示例 :
    </strong>
    <br>
    给定二叉树
   </p>
   <pre>
          1
         / \
        2   3
       / \     
      4   5    
</pre>
   <p>
    返回&nbsp;
    <strong>
     3
    </strong>
    , 它的长度是路径 [4,2,1,3] 或者&nbsp;[5,2,1,3]。
   </p>
   <p>
    <strong>
     注意：
    </strong>
    两结点之间的路径长度是以它们之间边的数目表示。
   </p>
  </div>
 </body>
</html>